package handler

import (
	"go-devops/common"
	"go-devops/domain/dto"
)

type NodeHandler interface {
	HandleNode(context *dto.NodeContext) error
	Stop(context *dto.NodeContext) error
}

var NodeFactory = map[string]NodeHandler{
	common.GIT:    NewGitTaskHandler(),
	common.MAVEN:  NewMavenTaskHandler(),
	common.DOCKER: NewDockerTaskHandler(),
	common.NODEJS: NewNodeJsTaskHandler(),
	common.K8S:    NewK8sTaskHandler(),
	common.GO:     NewGoTaskHandler(),
	common.CMAKE:  NewCmakeTaskHandler(),
	common.SSH:    NewSSHTaskHandler(),
	common.SFTP:   NewSFTPTaskHandler(),
}
